﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralEventEnquiry.aspx.cs"
    Inherits="MTRC.ODMS.Web.SOM.GeneralEvent.GeneralEventEnquiry" %>

<%@ Register Assembly="APJ.Web.UI.WebControls" Namespace="APJ.Web.UI.WebControls"
    TagPrefix="APJ" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <link id="cssWait" rel="stylesheet" type="text/css" />
    <%-- add by gordon 20150812 | For Search Wait Cursor --%>
    <script src="../../Javascript/CommonFunction.js" type="text/javascript"></script>
    <script src="../../Javascript/SOM/Common.js" type="text/javascript"></script>
    <style type="text/css">
        .HandCursorClass
        {
            cursor: pointer;
        }
    </style>
    <script type="text/javascript">
        function ChangeFreeTextSearchStatus(obj) {
            if (document.all['rdoAnd'].checked == true) {
                document.all['rdoAnd'].checked = "checked"
            }
            else {
                document.all['rdoOr'].checked = "checked"
            }

            if (obj.checked == true) {
                document.all['txtConditionOne'].disabled = '';
                document.all['txtConditionTwo'].disabled = '';
                document.all['txtConditionThree'].disabled = '';
                document.getElementById("rdoAnd").disabled = false;
                document.getElementById("rdoOr").disabled = false;
                document.all['txtConditionOne'].focus();

            }
            else {
                document.all['txtConditionOne'].disabled = 'disabled';
                document.all['txtConditionTwo'].disabled = 'disabled';
                document.all['txtConditionThree'].disabled = 'disabled';
                document.getElementById("rdoAnd").disabled = true;
                document.getElementById("rdoOr").disabled = true;
            }
        }

        function OpenEntryPageMaximum(url)  //huangyao 20081129 in MTR office
        {
            /*******************add by jack 20151202 for using session store enquiry condition start**********************/
            document.getElementById("<%=HiddenFieldUrl.ClientID %>").value = url;
            document.getElementById("<%=btnSetSession.ClientID %>").click();
            //            //debugger;
            //            var aaa = url;
            //            //xopen(url, window.screen.width, window.screen.height,'yes',null);
            //            //xopen(url, 1024, 768,'yes',null);
            //            //alert("test by huangyao");
            //            //  window.moveTo(0,0);   
            //            //  window.resizeTo(screen.availWidth,screen.availHeight);   
            //            //  window.outerWidth=screen.availWidth;   
            //            //  window.outerHeight=screen.availHeight;   

            //            //Date: 2015-08-13
            //            //            newwin = window.open("", "", "scrollbars=yes, toolbar=yes, menubar=yes, location=yes, status=yes, resizable=yes");
            //            //            if (document.all) {
            //            //                newwin.moveTo(0, 0);
            //            //                newwin.resizeTo(screen.width, screen.height - 25);
            //            //            }
            //            //            newwin.location = url;
            //            //Date: 2015-08-13

            //            //added by Nathan 2015-08-15
            //            var dateFrom;
            //            var dateTo;
            //            var station = document.getElementById("ddlStation").value;
            //            var inputAll = document.getElementsByTagName("input");
            //            for (var i = 0; i < inputAll.length; i++) {
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbCreateTimeFrom") >= 0) {
            //                    dateFrom = inputAll[i].value;
            //                }
            //                if (inputAll[i].type == "text" && inputAll[i].id.indexOf("dtbCreateTimeTo") >= 0) {
            //                    dateTo = inputAll[i].value;
            //                }
            //            }
            //            var chShow = getChackboxListValue("chklShow");
            //            var GenCategory = document.getElementById("ddlGenCategory").value;
            //            //var GenSubCategory = document.getElementById("ddlGenSubCategory").value;

            //            //var obj = document.getElementById('ddlGenSubCategory');
            //            //var GenSubCategory = obj.options[obj.selectedIndex].text; //获取文本
            //            var GenSubCategory;
            //            if (GenCategory == "0") {
            //                GenSubCategory = document.getElementById("ddlGenSubCategory").value;
            //            } else {
            //                var obj = document.getElementById('ddlGenSubCategory');
            //                GenSubCategory = obj.options[obj.selectedIndex].text; //获取文本
            //            }


            //            var GenState = document.getElementById("ddlGenState").value;
            //            var GenSeverity = document.getElementById("ddlGenSeverity").value;

            //            var FreeTextSearch = document.getElementById("chkFreeTextSearch").checked;
            //            var ConditionOne = document.getElementById("TextOne").value;
            //            var ConditionTwo = document.getElementById("TextTwo").value;
            //            var ConditionThree = document.getElementById("TextThree").value;


            //            var Rand = document.getElementById("rdoAnd").checked;
            //            var Ror = document.getElementById("rdoOr").checked;

            //            //            SetCookie("AdmissionRegistryEnquiry_ddlStation", station);
            //            //            SetCookie("AdmissionRegistryEnquiry_dtbCreateTimeFrom", dateFrom);
            //            //            SetCookie("AdmissionRegistryEnquiry_dtbCreateTimeTo", dateTo);
            //            //            SetCookie("AdmissionRegistryEnquiry_chklShow", chShow);
            //            //            SetCookie("AdmissionRegistryEnquiry_ddlGenCategory", GenCategory);
            //            //            SetCookie("AdmissionRegistryEnquiry_ddlGenSubCategory", GenSubCategory);
            //            //            SetCookie("AdmissionRegistryEnquiry_ddlGenState", GenState);
            //            //            SetCookie("AdmissionRegistryEnquiry_ddlGenSeverity", GenSeverity);
            //            //            SetCookie("AdmissionRegistryEnquiry_chkFreeTextSearch", FreeTextSearch);
            //            //            SetCookie("AdmissionRegistryEnquiry_StrConditionOne", ConditionOne);
            //            //            SetCookie("AdmissionRegistryEnquiry_StrConditionTwo", ConditionTwo);
            //            //            SetCookie("AdmissionRegistryEnquiry_StrConditionThree", ConditionThree);

            //            //            SetCookie("AdmissionRegistryEnquiry_rdoAnd", Rand);
            //            //            SetCookie("AdmissionRegistryEnquiry_rdoOr", Ror);

            //            var CookieValue = '{ "Station":"' + station + '", "DateFrom":"' + dateFrom + '", "DateTo":"' + dateTo + '", "List":"' + chShow + '", "GenCategory":"' + GenCategory + '", "GenSubCategory":"' + GenSubCategory + '", "GenState":"' + GenState + '", "GenSeverity":"' + GenSeverity + '", "FreeTextSearch":"' + FreeTextSearch + '", "ConditionOne":"' + ConditionOne + '", "ConditionTwo":"' + ConditionTwo + '", "ConditionThree":"' + ConditionThree + '", "Rand":"' + Rand + '", "Ror":"' + Ror + '"}';
            //            var pathName = window.document.location.pathname;
            //            var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            //            SetCookie("GeneralEvent_Common", CookieValue, "", projectName + "/");
            //            window.location.href = (url + "&isBack=1&PageID=GeneralEventEnquiry");
            //End added by Nathan 2015-08-15
            /*******************add by jack 20151202 for using session store enquiry condition end**********************/
        }
        //added by Nathan 2015-08-15
        function setSearchCookie() {
            /*******************add by jack 20151202 for using session store enquiry condition start**********************/
            //            var isBack = getQueryString("isBack");
            //            if (isBack == "1") {

            //                // var station = GetCookie("AdmissionRegistryEnquiry_ddlStation");
            //                var GeneralEvent = eval('(' + GetCookie("GeneralEvent_Common") + ')');
            //                var station = GeneralEvent.Station;
            //                if (station != "" && station != null) {

            //                    //                    document.getElementById("ddlStation").value = GetCookie("AdmissionRegistryEnquiry_ddlStation");
            //                    //                    document.getElementById("dtbCreateTimeFrom_dateTextBox").value = GetCookie("AdmissionRegistryEnquiry_dtbCreateTimeFrom");
            //                    //                    document.getElementById("dtbCreateTimeTo_dateTextBox").value = GetCookie("AdmissionRegistryEnquiry_dtbCreateTimeTo");
            //                    document.getElementById("ddlStation").value = station;
            //                    document.getElementById("dtbCreateTimeFrom_dateTextBox").value = GeneralEvent.DateFrom;
            //                    document.getElementById("dtbCreateTimeTo_dateTextBox").value = GeneralEvent.DateTo;

            //                    //var showValue = GetCookie("AdmissionRegistryEnquiry_chklShow");
            //                    var showValue = GeneralEvent.List;
            //                    setChackboxListValue("chklShow", showValue);

            //                    //document.getElementById("ddlGenCategory").value = GetCookie("AdmissionRegistryEnquiry_ddlGenCategory");
            //                    var ddlGenCategoryValue = GeneralEvent.GenCategory;
            //                    document.getElementById("ddlGenCategory").value = ddlGenCategoryValue;

            //                    if (ddlGenCategoryValue == "0") {
            //                        //document.getElementById("ddlGenSubCategory").value = GetCookie("AdmissionRegistryEnquiry_ddlGenSubCategory");
            //                        document.getElementById("ddlGenSubCategory").value = GeneralEvent.GenSubCategory;
            //                        document.getElementById("<%=TextGenSubCategory.ClientID%>").value = "";
            //                    } else {
            //                        //document.getElementById("<%=TextGenSubCategory.ClientID%>").value = GetCookie("AdmissionRegistryEnquiry_ddlGenSubCategory");
            //                        document.getElementById("<%=TextGenSubCategory.ClientID%>").value = GeneralEvent.GenSubCategory;
            //                    }
            //                    //document.getElementById("ddlGenState").value = GetCookie("AdmissionRegistryEnquiry_ddlGenState");
            //                    //document.getElementById("ddlGenSeverity").value = GetCookie("AdmissionRegistryEnquiry_ddlGenSeverity");
            //                    document.getElementById("ddlGenState").value = GeneralEvent.GenState;
            //                    document.getElementById("ddlGenSeverity").value = GeneralEvent.GenSeverity;

            //                    //if (GetCookie("AdmissionRegistryEnquiry_chkFreeTextSearch").toUpperCase() == "TRUE") {
            //                    if (GeneralEvent.GenSeverity.toUpperCase() == "TRUE") {
            //                        document.getElementById("chkFreeTextSearch").checked = true;
            //                        document.getElementById("txtConditionOne").disabled = true;
            //                        document.getElementById("txtConditionTwo").disabled = true;
            //                        document.getElementById("txtConditionThree").disabled = true;

            //                    } else {
            //                        document.getElementById("chkFreeTextSearch").checked = false;
            //                    }

            //                    //                    document.getElementById("TextOne").value = GetCookie("AdmissionRegistryEnquiry_StrConditionOne");
            //                    //                    document.getElementById("TextTwo").value = GetCookie("AdmissionRegistryEnquiry_StrConditionTwo");
            //                    //                    document.getElementById("TextThree").value = GetCookie("AdmissionRegistryEnquiry_StrConditionThree");
            //                    document.getElementById("TextOne").value = GeneralEvent.ConditionOne;
            //                    document.getElementById("TextTwo").value = GeneralEvent.ConditionTwo;
            //                    document.getElementById("TextThree").value = GeneralEvent.ConditionThree;
            //                    var v = 1;
            //                    //if (GetCookie("AdmissionRegistryEnquiry_rdoAnd").toUpperCase() == "TRUE") {
            //                    if (GeneralEvent.Rand.toUpperCase() == "TRUE") {
            //                        document.getElementById("rdoAnd").checked = true;
            //                        v = 1;
            //                    } else {
            //                        document.getElementById("rdoAnd").checked = false;
            //                    }
            //                    //if (GetCookie("AdmissionRegistryEnquiry_rdoOr").toUpperCase() == "TRUE") {
            //                    if (GeneralEvent.Ror.toUpperCase() == "TRUE") {
            //                        document.getElementById("rdoOr").checked = true;
            //                        v = 2;
            //                    } else {
            //                        document.getElementById("rdoOr").checked = false;
            //                    }
            //                    document.getElementById("TextRadio").value = v;
            //                }
            //                //                SetCookie("AdmissionRegistryEnquiry_ddlStation", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_dtbCreateTimeFrom", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_dtbCreateTimeTo", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_chklShow", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_ddlGenSubCategory", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_ddlGenState", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_ddlGenSeverity", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_chkFreeTextSearch", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_StrConditionOne", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_StrConditionTwo", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_StrConditionThree", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_ddlGenCategory", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_rdoAnd", "");
            //                //                SetCookie("AdmissionRegistryEnquiry_rdoOr", "");
            //                var pathName = window.document.location.pathname;
            //                var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            //                SetCookie("GeneralEvent_Common", "", -1000, projectName + "/");

            //            }
            document.getElementById("BFSearc").click();
            /*******************add by jack 20151202 for using session store enquiry condition end**********************/
        }
        //End added by Nathan 2015-08-15
    </script>
</head>
<body>
    <%--onload="ChangeFreeTextSearchStatus(document.all.chkFreeTextSearch)"--%>
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <!-------add by jack 20151202 for using session store enquiry condition start----->
    <asp:HiddenField ID="HiddenFieldUrl" runat="server" />
    <asp:Button ID="btnSetSession" runat="server" Text="SetSession" OnClick="btnSetSession_Click"
        Style="display: none" />
    <!-------add by jack 20151202 for using session store enquiry condition end----->
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M1402" />
            </td>
            <td class="Page_Right">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140201" ParentMenuID="M1402" DMenuMode="CurrOnly"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents">
                            <!--*******************************************bDGIN Contents**************************************-->
                            <%-- Add By Gordon 20150701 Fix If User Click Search Button,The NewsBar will stop working --%>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <Triggers>
                                    <asp:PostBackTrigger ControlID="btnExporttoExcel" />
                                </Triggers>
                                <ContentTemplate>
                                    <fieldset style="clear: both; margin-bottom: 5px; background-color: #eeeeee;">
                                        <table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td style="width: 29%">
                                                    <span style="padding-left: 2px;">
                                                        <asp:Label ID="lblStation" runat="server" Text="Staion"></asp:Label>
                                                        <asp:DropDownList ID="ddlStation" runat="server" CssClass="ddlStation">
                                                        </asp:DropDownList>
                                                    </span>
                                                </td>
                                                <td style="width: 35%;">
                                                    <div style="float: left; padding-top: 1px;">
                                                        <asp:Label ID="lblTimeFrom" runat="server"></asp:Label>&nbsp;<APJ:DateTextBox ID="dtbCreateTimeFrom"
                                                            runat="server" />
                                                        <asp:Label ID="lblTimeTo" runat="server"></asp:Label>&nbsp;<APJ:DateTextBox ID="dtbCreateTimeTo"
                                                            runat="server" />
                                                    </div>
                                                </td>
                                                <td style="width: 36%">
                                                    <div id="divDisplay" style="float: left; padding-bottom: 1px; padding-top: 5px;">
                                                        <asp:Label ID="lblShow" runat="server"></asp:Label>
                                                    </div>
                                                    <div style="float: left; padding-bottom: 1px; padding-top: 1px;">
                                                        <asp:CheckBoxList ID="chklShow" runat="server" CssClass="tableborder" RepeatColumns="4"
                                                            RepeatDirection="Horizontal">
                                                        </asp:CheckBoxList>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                        <div>
                                            <asp:UpdatePanel ID="udp1" runat="server">
                                                <ContentTemplate>
                                                    <table cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="left">
                                                                <div id="divWorkcategory" style="padding-top: 1px; float: left;">
                                                                    <table>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblGenCategory" runat="server"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <asp:DropDownList ID="ddlGenCategory" runat="server" Width="150px" AutoPostBack="True"
                                                                                    OnSelectedIndexChanged="ddlGenCategory_SelectedIndexChanged">
                                                                                </asp:DropDownList>
                                                                            </td>
                                                                            <td>
                                                                                &nbsp;<asp:Label ID="lblGenSubCategory" runat="server"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <%--added by Nathan 2015-08-15--%>
                                                                                <asp:TextBox ID="TextGenSubCategory" runat="server" Style="display: none;"></asp:TextBox>
                                                                                <asp:DropDownList ID="ddlGenSubCategory" runat="server" Width="150px" AutoPostBack="True">
                                                                                </asp:DropDownList>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </div>
                                                            </td>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <asp:Label ID="lblGenState" runat="server"></asp:Label>
                                                                        </td>
                                                                        <td>
                                                                            <asp:DropDownList ID="ddlGenState" runat="server">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                            <td>
                                                                <table>
                                                                    <tr>
                                                                        <td>
                                                                            <asp:Label ID="lblGenSeverity" runat="server"></asp:Label>
                                                                        </td>
                                                                        <td>
                                                                            <asp:DropDownList ID="ddlGenSeverity" runat="server">
                                                                            </asp:DropDownList>
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td>
                                                        <asp:CheckBox ID="chkFreeTextSearch" runat="server" OnCheckedChanged="chkFreeTextSearch_CheckedChanged"
                                                            Text="Free Text Search: " AutoPostBack="true" />
                                                        <%--onclick="ChangeFreeTextSearchStatus(this);"--%>
                                                    </td>
                                                    <td>
                                                        <%--added by Nathan 2015-08-15--%>
                                                        <asp:TextBox ID="TextOne" runat="server" Style="display: none;"></asp:TextBox>
                                                        <asp:TextBox ID="txtConditionOne" runat="server" Width="100px" MaxLength="50"></asp:TextBox><%--oninput="txtConditionOne_TextChanged"--%>
                                                    </td>
                                                    <td>
                                                        <%--added by Nathan 2015-08-15--%>
                                                        <asp:TextBox ID="TextTwo" runat="server" Style="display: none;"></asp:TextBox><%--Style="display: none;"--%>
                                                        <asp:TextBox ID="txtConditionTwo" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <%--added by Nathan 2015-08-15--%>
                                                        <asp:TextBox ID="TextThree" runat="server" Style="display: none;"></asp:TextBox>
                                                        <asp:TextBox ID="txtConditionThree" runat="server" Width="100px" MaxLength="50"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="TextRadio" runat="server" Style="display: none;"></asp:TextBox>
                                                        <asp:RadioButton ID="rdoAnd" runat="server" GroupName="nexusgroup" />
                                                        <asp:RadioButton ID="rdoOr" runat="server" GroupName="nexusgroup" />
                                                    </td>
                                                    <td align="right">
                                                        <%-- update by gordon 20150812 | For Search Wait Cursor --%>
                                                        <%--<asp:Button ID="btnSearch" runat="server" Text="" OnClick="btnSearch_Click" />&nbsp;--%>
                                                        <asp:Button ID="btnSearch" runat="server" Text="" OnClientClick="showWait('../../CSS/ForAdmRegWaitCursor.css')"
                                                            OnClick="btnSearch_Click" />&nbsp;
                                                        <asp:Button ID="btnNew" runat="server" Text="Add New" OnClick="btnNew_Click" />&nbsp;
                                                        <%--
                                                        update by gordon 20150910
                                                        <asp:Button ID="btnExporttoExcel" runat="server" Text="" OnClick="btnExporttoExcel_Click" />--%>
                                                        <asp:Button ID="btnExporttoExcel" runat="server" Text="" OnClientClick="return ExportClick('../../CSS/ForAdmRegWaitCursor.css',this.id)"
                                                            OnClick="btnExporttoExcel_Click" />
                                                        <%--added by Nathan 2015-08-15--%>
                                                        <asp:Button ID="BFSearc" runat="server" Text="" OnClick="BFSearc_Click" Style="display: none;" />&nbsp;
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </fieldset>
                                    <div id="divHiddenContainer">
                                        <input type="hidden" runat="server" id="hdnBoolClkBtn" />
                                        <input type="hidden" runat="server" id="hdnCacheDataReturnInt" value="0" />
                                    </div>
                                    <div style="width: 100%; padding-left: 1px;">
                                        <APJ:CommonGridView ID="grdSearchResult" runat="server" AllowPaging="True" AllowSorting="True"
                                            AscPic="~/Images/Common/arrow_up_green.png" AutoGenerateColumns="False" BorderColor="black"
                                            CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png" BackColor="White"
                                            BorderWidth="1px" OnRowDataBound="grdSearchResult_RowDataBound" DataKeyNames="StationEventID,HandoverNote"
                                            OnNeedDataBind="grdSearchResult_NeedDataBind" PageLinkCount="7">
                                            <RowStyle CssClass="GridView_Row" />
                                            <HeaderStyle CssClass="GridView_Header" BackColor="#D1F2FF" Font-Bold="True" Font-Names="Arial"
                                                Font-Overline="False" Font-Size="9pt" Font-Strikeout="False" Font-Underline="False"
                                                ForeColor="#022D72" />
                                            <AlternatingRowStyle CssClass="GridView_AlternativeRow" BackColor="Silver" />
                                            <Columns>
                                                <asp:HyperLinkField DataTextField="EventNo" HeaderText="SOM_EventNo" SortExpression="EventNo">
                                                    <ItemStyle CssClass="HandCursorClass" Width="70px" />
                                                </asp:HyperLinkField>
                                                <asp:TemplateField HeaderText="SOM_GeneralEventTime" SortExpression="EventTime">
                                                    <ItemStyle Width="70px" />
                                                    <ItemTemplate>
                                                        <%# FormatEventTimeInGrid(Eval("EventTime").ToString())%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:BoundField DataField="GenCategoryDesc" HeaderText="SOM_GenCategory" SortExpression="GenCategoryDesc">
                                                    <%-- update by gordon 20150807 U129.2 --%>
                                                    <%--<ItemStyle Width="56px" />--%>
                                                    <ItemStyle Width="65px" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="GenSubCategoryDesc" HeaderText="SOM_GenSubCategory" SortExpression="GenSubCategoryDesc">
                                                    <%-- update by gordon 20150807 U129.2 --%>
                                                    <%--<ItemStyle Width="56px" />--%>
                                                    <ItemStyle Width="85px" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="GenStateDesc" HeaderText="SOM_GenState" SortExpression="GenStateDesc">
                                                    <%-- update by gordon 20150807 U129.2 --%>
                                                    <%--<ItemStyle Width="40px" />
                                                    <HeaderStyle Width="40px" />--%>
                                                    <ItemStyle Width="90px" />
                                                    <HeaderStyle Width="90px" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="GenSeverityDesc" HeaderText="SOM_GenSeverity" SortExpression="GenSeverityDesc">
                                                    <ItemStyle Width="50px" />
                                                </asp:BoundField>
                                                <asp:BoundField DataField="Description" HeaderText="COM_Description" SortExpression="Description">
                                                </asp:BoundField>
                                                <asp:BoundField DataField="Reportedby" HeaderText="SOM_Reportedby" SortExpression="Reportedby">
                                                    <%-- add by gordon 20150807 U129.2 --%>
                                                    <ItemStyle Width="80px" />
                                                </asp:BoundField>
                                                <asp:TemplateField Visible="False">
                                                    <HeaderStyle BorderStyle="None" />
                                                    <ItemTemplate>
                                                        <%# Eval("EventStatusID")%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="COM_Status" SortExpression="EventStatusID">
                                                    <ItemStyle Width="40px" />
                                                    <HeaderStyle Width="40px" />
                                                    <ItemTemplate>
                                                        <asp:Image ID="Image1" runat="server" ToolTip='<%# Eval("EventStatusDesc")%>'></asp:Image>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField Visible="False">
                                                    <HeaderStyle BorderStyle="None" />
                                                    <ItemTemplate>
                                                        <%# Eval("FlagHandover")%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="SOM_Handover" SortExpression="FlagHandover">
                                                    <ItemStyle Width="46px" />
                                                    <ItemTemplate>
                                                        <asp:Image ID="Image2" runat="server"></asp:Image>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField Visible="False">
                                                    <HeaderStyle BorderStyle="None" />
                                                    <ItemTemplate>
                                                        <%# Eval("HighLight")%>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField HeaderText="SOM_HighLight" SortExpression="HighLight">
                                                    <ItemStyle Width="46px" />
                                                    <ItemTemplate>
                                                        <asp:Image ID="Image3" runat="server"></asp:Image>
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                                <asp:TemplateField Visible="False">
                                                    <HeaderStyle BorderStyle="None" />
                                                    <ItemTemplate>
                                                        <asp:Label ID="lblHandoverNote" runat="server" Text='<%# Eval("HandoverNote")%>' />
                                                    </ItemTemplate>
                                                </asp:TemplateField>
                                            </Columns>
                                            <FooterStyle BackColor="White" ForeColor="#000066" />
                                            <EmptyDataRowStyle CssClass="GridView_Header" />
                                            <EmptyDataTemplate>
                                                <asp:Table ID="Table1" runat="server" CssClass="GridView_Header_EmptyData">
                                                    <asp:TableRow ID="TableRow1" runat="server">
                                                        <asp:TableCell ID="TableCell1" runat="server" Style="border-right: black 1px solid;" Width="110px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell2" runat="server" Style="border-right: black 1px solid;" Width="80px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell3" runat="server" Style="border-right: black 1px solid;" Width="56px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell4" runat="server" Style="border-right: black 1px solid;" Width="56px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell5" runat="server" Style="border-right: black 1px solid;" Width="40px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell6" runat="server" Style="border-right: black 1px solid;" Width="60px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell7" runat="server" Style="border-right: black 1px solid;"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell8" runat="server" Style="border-right: black 1px solid;" Width="40px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell9" runat="server" Style="border-right: black 1px solid;" Width="46px"></asp:TableCell>
                                                        <asp:TableCell ID="TableCell10" runat="server" Width="46px"></asp:TableCell>
                                                    </asp:TableRow>
                                                </asp:Table>
                                            </EmptyDataTemplate>
                                            <PagerTemplate>
                                                <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                    <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                            <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                            <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                            &nbsp; &nbsp;
                                                            <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                            &nbsp;<asp:Label ID="Label1" runat="server">/</asp:Label>
                                                            &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                            <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                            &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                                <asp:ListItem Value="10">10</asp:ListItem>
                                                                <asp:ListItem Value="15">15</asp:ListItem>
                                                                <asp:ListItem Value="20">20</asp:ListItem>
                                                                <asp:ListItem Value="25">25</asp:ListItem>
                                                                <asp:ListItem Value="30">30</asp:ListItem>
                                                            </asp:DropDownList>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                            <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                            <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                            </asp:Panel>
                                                        </asp:TableCell>
                                                        <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                            <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                        </asp:TableCell>
                                                    </asp:TableRow>
                                                </asp:Table>
                                            </PagerTemplate>
                                        </APJ:CommonGridView>
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            <%-- Add End --%>
                            <!--*******************************************End Contents**************************************-->
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>
</body>
<script language="javascript" type="text/javascript">
    setSearchCookie();
</script>
</html>
